home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / Source / GENetReleaseƒ / GELibHeaders / Sensors.h < prev   
Text File  |  1994-03-07  |  2KB  |  79 lines

  1. /*
  2.     Sensors.h
  3.     
  4.     Basic Graphic Elements which interact with the user. 
  5.     
  6.     For Graphic Elements release version 1.0b1
  7.     
  8.     Copyright 1994 by Al Evans. All rights reserved.
  9.     
  10.     3/7/94
  11. */
  12.  
  13. #ifndef GESENSORS
  14. #define GESENSORS
  15.  
  16. #include "GraphElements.h"
  17.  
  18. //Sensor types
  19. enum {
  20.     btnSensor,
  21.     switchSensor,
  22.     hSlideSensor,
  23.     vSlideSensor
  24. };
  25.  
  26. //Sensor states
  27. enum {
  28.     sensorOff = 0,
  29.     sensorOn
  30. };
  31.  
  32. #ifdef __cplusplus
  33. extern "C" {
  34. #endif
  35.  
  36. //-------------------------------------------------------------------------------------
  37. //Pushbutton-type sensor
  38. //-------------------------------------------------------------------------------------
  39.  
  40. GrafElPtr NewButtonSensor(GEWorldPtr world, OSType id, short plane, 
  41.                     short resNum, short xPos, short yPos);
  42.  
  43. //Tracking proc for button-type sensor
  44. pascal Boolean TrackButtonSensor(GEWorldPtr world, GrafElPtr sensor);
  45.  
  46. //-------------------------------------------------------------------------------------
  47. //Switch-type sensor
  48. //-------------------------------------------------------------------------------------
  49.  
  50. GrafElPtr NewSwitchSensor(GEWorldPtr world, OSType id, short plane, 
  51.                     short resNum, short xPos, short yPos);
  52.                     
  53. //Tracking proc for switch-type sensor
  54. pascal Boolean TrackSwitchSensor(GEWorldPtr world, GrafElPtr sensor);
  55.  
  56. //Set switch to "on" or "off"
  57. pascal void SetSwitchState(GEWorldPtr world, OSType id, short newState);
  58.  
  59. //-------------------------------------------------------------------------------------
  60. //Slider-type sensor
  61. //-------------------------------------------------------------------------------------
  62.  
  63. GrafElPtr NewSliderSensor(GEWorldPtr world, OSType id, short plane,
  64.                     short resNum, short xPos, short yPos, short sliderType,
  65.                     short handleResNum);
  66.  
  67. //Tracking proc for slider-type sensor
  68. pascal Boolean TrackSliderSensor(GEWorldPtr world, GrafElPtr sensor);
  69.  
  70. //Set reading of slider-type sensor
  71. pascal void SetSliderPercent(GEWorldPtr world, OSType id, short newSetting);
  72.  
  73.  
  74. #ifdef __cplusplus
  75. }
  76. #endif
  77.  
  78.  
  79. #endif